﻿using System;
using System.Data;

namespace Smatime.Web.Models
{
    public class ListStoreOfCompany : BaseEntity
    {
        public string StoreName { get; set; }
        public long StoreId { get; set; }
        public DateTime? ClosingTime { get; set; }
        public string WelcomeMessage { get; set; }
        public long TotalStaff { get; set; }

        public override BaseEntity FromDataRow(DataRow row)
        {
            Id = (long) row["Id"];
            StoreName = row["StoreName"].ToString();
            StoreId = (long) row["StoreId"];
            ClosingTime = row["ClosingTime"].ToDateTime();
            WelcomeMessage = row["WelcomeMessage"].ToString();
            TotalStaff = (long) row["TotalStaff"];
            return base.FromDataRow(row);
        }

        public override void ToDataRow(DataRow row)
        {
            base.ToDataRow(row);
        }
    }
}